* eshell/esh-util.el (eshell-read-hosts-file): Use `filename' arg.
authorGlenn Morris <rgm@gnu.org>
Thu, 19 Sep 2013 02:48:01 +0000 (19:48 -0700)
committerGlenn Morris <rgm@gnu.org>
Thu, 19 Sep 2013 02:48:01 +0000 (19:48 -0700)
(directory-files-and-attributes): Mark unused arg.

lisp/ChangeLog
lisp/eshell/esh-util.el

index 02cee5fceb820da61d43d837e8667fde09fc54c5..c2cbfa4b321bff7407d9be0aeddb431f26b38d44 100644 (file)
@@ -1,5 +1,8 @@
 2013-09-19  Glenn Morris  <rgm@gnu.org>
 
+       * eshell/esh-util.el (eshell-read-hosts-file): Use `filename' arg.
+       (directory-files-and-attributes): Mark unused arg.
+
        * eshell/em-unix.el (eshell-remove-entries):
        Remove unused arg `path'.  Update callers.
 
index 6195f3976c11fe4f18256882408e23269336c877..4d53b3fb86dfc32bbf4af7c4ae08036ae9206274 100644 (file)
@@ -477,10 +477,10 @@ list."
 (defalias 'eshell-user-name 'user-login-name)
 
 (defun eshell-read-hosts-file (filename)
-  "Read in the hosts from the /etc/hosts file."
+  "Read in the hosts from FILENAME, default `eshell-hosts-file'."
   (let (hosts)
     (with-temp-buffer
-      (insert-file-contents eshell-hosts-file)
+      (insert-file-contents (or filename eshell-hosts-file))
       (goto-char (point-min))
       (while (re-search-forward
              "^\\([^#[:space:]]+\\)\\s-+\\(\\S-+\\)\\(\\s-*\\(\\S-+\\)\\)?" nil t)
@@ -563,9 +563,11 @@ Unless optional argument INPLACE is non-nil, return a new string."
 
 (defvar ange-cache)
 
+;; Partial reimplementation of Emacs's builtin directory-files-and-attributes.
+;; id-format not implemented.
 (and (featurep 'xemacs)
      (not (fboundp 'directory-files-and-attributes))
-     (defun directory-files-and-attributes (directory &optional full match nosort id-format)
+     (defun directory-files-and-attributes (directory &optional full match nosort _id-format)
     "Return a list of names of files and their attributes in DIRECTORY.
 There are three optional arguments:
 If FULL is non-nil, return absolute file names.  Otherwise return names